{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/addons/builder/css/base.css" media="all">
<style>
    .layui-form-item {
        margin-bottom: 15px !important;
        clear: both;
        *zoom: 1;
    }
</style>
<body>
<form class="layui-form" id="form" action="{:url('save')}">
    {include file="public/arguments" /}
    <input type="hidden" name="id" value="{$Request.get.id}" />
    <input type="hidden" name="pid" value="{$Request.get.pid|default=0}" />
    <div class="layui-fluid layui-anim layui-anim-downbit">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">
                <div class="layui-row" style="padding-top: 8px;">
                    {if $p_title }
                    <div class="layui-form-item">
                        <label class="layui-form-label">上级分类</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" value="{$p_title}" disabled />
                        </div>
                    </div>
                    {else}
                    <div class="layui-form-item">
                        <label class="layui-form-label">图标</label>
                        {table:alone view='items/img' info='$info' form='["field" => "icon", "value" => 1]'/}
                    </div>
                    {/if}
                    <div class="layui-form-item">
                        <label class="layui-form-label">分类名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" lay-verify="required" lay-reqtext="请输入分类名称" placeholder="请输入分类名称"
                                   value="{$info?$info.title:''}" class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-block">
                            <input type="number" name="sort" placeholder="请输入排序，越小越靠前" value="{$info?$info.sort:''}" class="layui-input" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {include file="public/submit" /}
</form>
</body>
{include file="public/footer" /}
</html>